//
//  Deng.m
//  OC02_作业
//
//  Created by dllo on 15/12/1.
//  Copyright © 2015年 dllo. All rights reserved.
//

#import "Deng.h"

@implementation Deng
- (void)information{
    NSLog(@"colour:%@, age:%d", _colour, _age);
}

//- (void)setColour:(NSString *)colour {
//    _colour = colour;
//}
//- (NSString *)colour {
//    return _colour;
//}
//
//- (void)setAge:(int)age {
//    _age = age;
//}
//- (int)age {
//    return _age;
//}

- (instancetype)initWithColour:(NSString *)colour
                           age:(int)age {
    self = [super init];
    if (self) {
        _colour = colour;
        _age = age;
    }
    return self;
}

+ (instancetype)dengWithColour:(NSString *)colour
                           age:(int)age {
    Deng *deng = [[Deng alloc] initWithColour:colour age:age];
    return deng;
}
@end
